package com.ruoyi.myplayer.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.myplayer.mapper.PlayerDailyMapper;
import com.ruoyi.myplayer.domain.PlayerDaily;
import com.ruoyi.myplayer.service.IPlayerDailyService;

import javax.annotation.Resource;

/**
 * 每日推荐歌单Service业务层处理
 * 
 * @author lvyq
 * @date 2025-04-07
 */
@Service
public class PlayerDailyServiceImpl implements IPlayerDailyService 
{
    @Resource
    private PlayerDailyMapper playerDailyMapper;

    /**
     * 查询每日推荐歌单
     * 
     * @param id 每日推荐歌单主键
     * @return 每日推荐歌单
     */
    @Override
    public PlayerDaily selectPlayerDailyById(Long id)
    {
        return playerDailyMapper.selectPlayerDailyById(id);
    }

    /**
     * 查询每日推荐歌单列表
     * 
     * @param playerDaily 每日推荐歌单
     * @return 每日推荐歌单
     */
    @Override
    public List<PlayerDaily> selectPlayerDailyList(PlayerDaily playerDaily)
    {
        return playerDailyMapper.selectPlayerDailyList(playerDaily);
    }

    /**
     * 新增每日推荐歌单
     * 
     * @param playerDaily 每日推荐歌单
     * @return 结果
     */
    @Override
    public int insertPlayerDaily(PlayerDaily playerDaily)
    {
        return playerDailyMapper.insertPlayerDaily(playerDaily);
    }

    /**
     * 修改每日推荐歌单
     * 
     * @param playerDaily 每日推荐歌单
     * @return 结果
     */
    @Override
    public int updatePlayerDaily(PlayerDaily playerDaily)
    {
        return playerDailyMapper.updatePlayerDaily(playerDaily);
    }

    /**
     * 批量删除每日推荐歌单
     * 
     * @param ids 需要删除的每日推荐歌单主键
     * @return 结果
     */
    @Override
    public int deletePlayerDailyByIds(Long[] ids)
    {
        return playerDailyMapper.deletePlayerDailyByIds(ids);
    }

    /**
     * 删除每日推荐歌单信息
     * 
     * @param id 每日推荐歌单主键
     * @return 结果
     */
    @Override
    public int deletePlayerDailyById(Long id)
    {
        return playerDailyMapper.deletePlayerDailyById(id);
    }

    @Override
    public List<Map<String, Object>> getDailyLst() {
        return playerDailyMapper.getDailyLst();
    }

    /**
     * @description 获取热门单曲
     * @author lvyq
     * @throws
     * @return List<Map<Object>>
     * @time 2025-04-08 17:17
     */
    @Override
    public List<Map<String, Object>> getHeatSong() {
        return playerDailyMapper.getHeatSong();
    }
}
